//
//  MessageToCell.h
//  HotWord
//
//  Created by Rainbow on 8/11/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ITTImageView.h"
#import "Message.h"
#import <QuartzCore/CALayer.h>

@protocol MessageToCellDelegate;

@interface MessageToCell : UITableViewCell
@property (retain, nonatomic) IBOutlet UILabel *contentLabel;
@property (retain, nonatomic) IBOutlet UIImageView *talkBgView;
@property (retain, nonatomic) IBOutlet ITTImageView *headImageView;
@property (retain, nonatomic) IBOutlet UIView *timeView;
@property (retain, nonatomic) IBOutlet UILabel *timeLabel;
@property (retain, nonatomic) IBOutlet UIButton *failedBtn;
@property (retain, nonatomic) Message *currentMessage;
@property (assign, nonatomic) id<MessageToCellDelegate> delegate;

- (void)setMessage:(Message *)message;
+ (CGFloat)getCellHeightByContent:(NSString *)content;
- (IBAction)tapOnResendBtn:(id)sender;

@end

@protocol MessageToCellDelegate <NSObject>

- (void)resendMessage:(Message *)message;

@end
